<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>Vue基础组件</title>
</head>

<body>
	<div id="temp">
		<btn-values></btn-values>
		<btn-values></btn-values>
		<btn-values></btn-values>
		<panda></panda>
	</div>



	<script src="https://cdn.jsdelivr.net/npm/vue"></script>
	<script>
		Vue.component('btn-values', {
			template: `<button @click="alert(1)">我是全局组件</button>`,
		})
		var temp = new Vue({
			el: "#temp",
			components: {
				"panda": {
					template: `<div style="color:red;">我是局部组件</div>`
				}
			}
		})
	</script>
</body>

</html>